package com.qingzhu.dao;

import com.qingzhu.pojo.ReceivingAddress;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ReceivingAddressDao {
    // 根据用户id查找该用户名下添加的所有收货地址
    public List<ReceivingAddress> findAll(int userId);
    // 根据地址id查找收货地址
    public ReceivingAddress findById(int id);
    // 添加收货地址
    public int addOneReceivingAddress(ReceivingAddress receivingAddress);
    // 修改收货地址
    public int updateOneReceivingAddress(ReceivingAddress receivingAddress);
    // 修改地址的默认状态
    public int updateDefaultDreceivingAddress(@Param("defaultState") int defaultState,@Param("id") int id);
    // 删除收货地址
    public int delOneReceivingAddress(int id);
}
